package com.member.shop.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.member.shop.domain.SysBizOrder;
import com.member.shop.domain.SysBizOrderImport;
import com.member.shop.dto.OrderPerDto;
import com.member.shop.dto.PrintOrderDto;
import com.member.shop.vo.*;

import java.util.List;

/**
 * 订单Service接口
 *
 * @author lixinchen
 * @date 2024-01-08
 */
public interface ISysBizOrderService extends IService<SysBizOrder> {
    /**
     * 查询订单
     *
     * @param id 订单主键
     * @return 订单
     */
    public SysBizOrder selectSysBizOrderById(Long id);

    /**
     * 查询订单列表
     *
     * @param queryWrapper 订单
     * @return 订单集合
     */
    public List<SysBizOrder> selectSysBizOrderList(LambdaQueryWrapper<SysBizOrder> queryWrapper);


    /**
     * 查询订单列表
     *
     * @param sysBizOrder 订单
     * @return 订单集合
     */
    public List<SysBizOrder> selectSysBizOrderList(SysBizOrder sysBizOrder);

    /**
     * 新增订单
     *
     * @param sysBizOrder 订单
     * @return 结果
     */
    public int insertSysBizOrder(SysBizOrder sysBizOrder);

    /**
     * 修改订单
     *
     * @param sysBizOrder 订单
     * @return 结果
     */
    PrintOrderDto updateSysBizOrder(SysBizOrder sysBizOrder);

    /**
     * 批量删除订单
     *
     * @param ids 需要删除的订单主键集合
     * @return 结果
     */
    public int deleteSysBizOrderByIds(Long[] ids);

    /**
     * 删除订单信息
     *
     * @param id 订单主键
     * @return 结果
     */
    public int deleteSysBizOrderById(Long id);

    /**
     * 查询订单列表(统计)
     *
     * @param sysBizOrder 订单
     * @return 订单集合
     */
    List<SysBizOrder> listOrderCount(SysBizOrder sysBizOrder);

    String preorder(OrderDataVo orderDataVo, OrderPerDto orderPerDto, Long userId);

    String preorderNew(SysBizOrder sysBizOrder, OrderPerDto orderPerDto, Long userId,Long tenantId, PayVo payVo);

    void balanceDiscount(SysBizOrder sysBizOrder);

    void cancelOrder(SysBizOrder sysBizOrder);

    OrderDetailVo queryOrderDetail(SysBizOrder sysBizOrder);

    List<SysBizOrder> queryDevelopMemberOrder(List<Long> userIdList);

    /**
     * 批量发货
     */
    int orderImportData(List<SysBizOrderImport> orderImport, boolean updateSupport, String operName);

    //导出
    List<SysBizOrderExportVo> selectSysBizOrderExportList(SysBizOrder sysBizOrder);

    List<OrderCodeVo> listOrderCode();

    List<OrderCodeVo> listReceiver();

    List<OrderCodeVo> listContactNumber();

    String orderPush(Long id);
}
